<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link type="text/css" rel="stylesheet" href="../static/css/style.css">

    <style>



</style>
</head>
<body>
<div class="jumbotron" style="background">
    <h1 class="text-center" th:text="${drawName}"></h1>
    <h1 class="text-center">答辩</h1>
    <p class="text-center">This is a lightweight defense system, can be applied to various occasions of defense, for your defense activities to provide convenience! </p>
</div>
<!--左右-->
<div id="l_r">
</div>

<div id="Middle">
    <div class="col-md-12 column">
        <table class="table table-hover table-striped">
            <a th:href="@{'/manaLogin/toAddStudent/'+${drawName}}"  class="btn btn-primary">
                点我添加学生
            </a>
            <thead>
                <tr>
                    <th>学生学号</th>
                    <th>学生姓名</th>
                    <th>学生专业</th>
                    <th>答辩序号</th>
                    <th>答辩成绩</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="student:${students}">
                    <td th:text="${student.stuid}"></td>
                    <td th:text="${student.stuname}"></td>
                    <td th:text="${student.major}"></td>
                    <td th:text="${student.drawres}"></td>
                    <form action="/manaLogin/updateScore" method="post">
                        <input type="hidden" th:value="${drawName}" name="drawName">
                        <input type="hidden" th:value="${student.stuid}" name="stuId">
                        <td><input type="text" th:value="${student.score}" name="newScore"></td>
                        <td>
                            <button type="submit" class="btn btn-primary">修改</button>
                        </td>
                    </form>
                    <td>
                        <a th:href="@{'/manaLogin/delFromDraw/'+${drawName}+'/'+${student.stuid}}" class="btn btn-primary" >删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>


    <div class="btn-group btn-group-justified" role="group" aria-label="...">
        <div class="btn-group" role="group">
            <a th:href="@{'/manaLogin/toDefenseOrder/'+${drawName}+'/1'}"  class="btn btn-primary">查看已抽签</a>
        </div>
        <div class="btn-group" role="group">
            <a th:href="@{'/manaLogin/toDefenseOrder/'+${drawName}+'/2'}"  class="btn btn-primary">查看未抽签</a>
        </div>
        <div class="btn-group" role="group">
            <a th:href="@{'/manaLogin/toDefenseOrder/'+${drawName}+'/3'}"  class="btn btn-primary">重新抽签</a>
        </div>
        <div class="btn-group" role="group">
            <a th:href="@{'/manaLogin/download/'+${drawName}}" class="btn btn-primary">下载结果</a>
        </div>
        <div class="btn-group" role="group">
            <a th:href="@{'/manaLogin/toConfigEmail/'+${drawName}}" class="btn btn-primary">发到邮箱</a>
        </div>
    </div>
</div>




</body>
</html>